<?php use Backend\Controller\Plugin\AuthorizationPlugin; ?>

<?php echo $this->partial('sejour/sejourNavPartial', array (
    'sejourId' => $this->id
  ));
?>

<div ng-app="sejourModule">
	<div ng-controller="EditionSejourController">
		<alert ng-repeat="alert in alerts" type="alert.type" close="closeAlert($index)">{{alert.msg}}</alert>
		<form name="formSejour" class="formSejour" ng-submit="post(formSejour.$valid)" novalidate>
			<input type="hidden" name="id" id="id" value="<?php echo $this->id;?>">			
			<?php echo $this->partial('sejour/sejourDetailsPartial'); ?>
			<div class="row">
				<div class="col-lg-3">
					<?php if( AuthorizationPlugin::isAllowed2($this->layout()->loadIdentity, "Sejour", "edit") ) { ?>
			    		<button type="submit" style="font-size: 0.75em;" class="btn btn-primary btn-lg">Mettre &#224; jour</button>
			    	<?php } ?>
					<button type="button" ng-click="cancel()" style="font-size: 0.75em;" class="btn btn-default btn-lg">Annuler</button>
				</div>
			</div>
		</form>
	</div>
</div>
